'*******************************************************************************
' *  
' *  Product: GSALib
' *  Description: A C# API for accessing the Google Search Appliance.
' *
' *  (c) Copyright 2008 Michael Cizmar + Associates Ltd.  (MC+A)
' *  
'*******************************************************************************


Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Text

Namespace GSALib.GSA
    ''' <summary>
    ''' Provides metods to create OneBoxResult  objects
    ''' <para>Author Albert Ghukasyan</para>
    ''' </summary>
    Public NotInheritable Class OneBoxResult
#Region "Varaibles"

        Private url As String
        Private fieldEntries As ArrayList

#End Region

#Region "Contructor"

        Public Sub New()
            Me.fieldEntries = New ArrayList()
        End Sub

#End Region

#Region "Get/Set Properties"

        Public Function getUrl() As String
            Return url
        End Function

        Public Sub setUrl(ByVal url As String)
            Me.url = url
        End Sub

        Public Function getFieldEntries() As Entry()
            Return DirectCast(fieldEntries.ToArray(), Entry())
        End Function

        Private Sub addFieldEntry(ByVal key As String, ByVal value As String)
            Me.fieldEntries.Add(New Entry(key, value))
        End Sub

#End Region
    End Class

    Public NotInheritable Class Entry
#Region "Varaibles"

        Private key As Object
        Private value As Object

#End Region

#Region "Contructor"

        Public Sub New(ByVal key As Object, ByVal value As Object)
            Me.key = key
            Me.value = value
        End Sub

#End Region

#Region "Get/Set Properties"

        Public Function getKey() As Object
            Return key
        End Function

        Public Function getValue() As Object
            Return value
        End Function

        Public Function setValue(ByVal value As Object) As Object
            Dim retval As Object = value
            Me.value = value
            Return retval
        End Function

#End Region
    End Class

End Namespace
